package com.puscene.framwork.test;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;

import com.puscene.framwork.R;
import com.puscene.framwork.base.FragmentIntent;

public class FirstFragment extends BaseFragment {

	private TextView btn;
	@Override
	@Nullable
	public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreateView(inflater, container, savedInstanceState);
		return View.inflate(getActivity(), R.layout.first_fragment, null);
	}
	
	@Override
	public void onActivityCreated(@Nullable Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onActivityCreated(savedInstanceState);
		btn = (TextView) getView().findViewById(R.id.textView1);
		btn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Log.e("", "click----FirstFragment");
				FragmentIntent fragmentIntent = new FragmentIntent(R.id.contentLayout2, FourFragment.class, getActivity().getSupportFragmentManager());
				showFragment(fragmentIntent);
			}
		});
	}
}
